//
//  MoreNewsCell.m
//  suRead
//
//  Created by colin on 2020/1/7.
//  Copyright © 2020 bao. All rights reserved.
//

#import "MoreNewsCell.h"
#import "M_News.h"

@interface MoreNewsCell()
@property(nonatomic,weak) IBOutlet UILabel *labelTitle;
@property(nonatomic,weak) IBOutlet UILabel *labelTime;
@property(nonatomic,weak) IBOutlet UIView *viewCircle;
@property(nonatomic,weak) IBOutlet UIView *lineTop;
@property(nonatomic,weak) IBOutlet UIView *lineBottom;
@end

@implementation MoreNewsCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.viewCircle.layer.cornerRadius = 4.0;
    self.viewCircle.layer.masksToBounds = YES;
}

- (void)refresh:(M_News *)news index:(NSInteger)index total:(NSInteger)total {
    if (index == 0) {
        self.lineTop.hidden = YES;
    }
    
    if (index == total - 1) {
        self.lineBottom.hidden = YES;
    }
    
    self.labelTitle.text = news.f_title;
    self.labelTime.text = news.f_update_time;
}

@end
